package org.gamma.example.applet;

import java.awt.FlowLayout;
import java.awt.Panel;
import java.awt.TextArea;
import netscape.javascript.JSObject;
import org.gamma.applet.GammaApplet;
import org.gamma.applet.GammaTask;

public class TestApplet extends GammaApplet {
	private static final long serialVersionUID = -8296720632721327512L;
    private Panel panel = new Panel();
    private TextArea text = new TextArea(20, 100);

    @Override
    public void init() {
        this.setLayout(new FlowLayout());
        panel.add(text);
        this.add(panel);
    }
    
    protected void log(String msg) {
        text.setText(text.getText() + System.getProperty("line.separator") + msg);
    }

	@Override
	protected GammaTask taskFor(JSObject input) {
		return new TestTask();
	}
}
